package com.base.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @TableName empi_weight_file_combination
 */
@TableName(value ="empi_weight_file_combination")
@Data
public class EmpiWeightFileCombination implements Serializable {
    /**
     *
     */
    private Integer weightId;

    /**
     *
     */
    private String fileCombination;

    /**
     *
     */
    private String fileNameCombination;

    /**
     *
     */
    private Integer weight;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmpiWeightFileCombination other = (EmpiWeightFileCombination) that;
        return (this.getWeightId() == null ? other.getWeightId() == null : this.getWeightId().equals(other.getWeightId()))
            && (this.getFileCombination() == null ? other.getFileCombination() == null : this.getFileCombination().equals(other.getFileCombination()))
            && (this.getFileNameCombination() == null ? other.getFileNameCombination() == null : this.getFileNameCombination().equals(other.getFileNameCombination()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getWeightId() == null) ? 0 : getWeightId().hashCode());
        result = prime * result + ((getFileCombination() == null) ? 0 : getFileCombination().hashCode());
        result = prime * result + ((getFileNameCombination() == null) ? 0 : getFileNameCombination().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", weightId=").append(weightId);
        sb.append(", fileCombination=").append(fileCombination);
        sb.append(", fileNameCombination=").append(fileNameCombination);
        sb.append(", weight=").append(weight);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
